/**
* @ClassName: package-info
* @Description: TODO(这里用一句话描述这个类的作用)
* @author bql
* @date 2019年4月27日
*
*/
package org.bao.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.bao.bean.usermessageBean;
import org.bao.dao.usermessageDao;
import org.bao.service.ILoginService;
import org.springframework.stereotype.Service;

@Service("loginS")
public class LoginServiceImpl implements ILoginService {
	// 依赖注入【反转控制】
	// 面向接口的编程
	@Resource
	private usermessageDao loginD; // 按类型匹配进行注入

	@Override
	public List<usermessageBean> queryLoginInfo(usermessageBean userB) {
		List<usermessageBean> userB2 = loginD.selectByPrimaryTelAndPsw(userB);
		System.out.println("查询结果:");
		System.out.println(userB2.toString());
		return userB2;
	}

	@Override
	public List<usermessageBean> queryLoginInfo2(usermessageBean userB) {
		List<usermessageBean> userB2 = loginD.selectByPrimaryTel(userB);
		System.out.println("查询结果:");
		System.out.println(userB2.toString());

		return userB2;
	}

	@Override
	public Integer insertTelAndAuthmsg(usermessageBean userB) {

		int count = loginD.insertTelAndAuthmsg(userB);
		System.out.println("执行结果:" + count);

		return count;
	}

}
